﻿using System.ComponentModel.DataAnnotations;
using MediatR;
using WeatherHistory.Shared.Validation;

namespace WeatherHistory.Api.CommandsQueries.Commands.Weathers.Create;

public class CreateWeathersCommandRequest : IRequest<CreateWeathersCommandResponse>
{
    [Required]
    [GreaterThan(0L)]
    public long RegionId { get; set; }

    public float Temperature { get; set; }

    public float Humidity { get; set; }

    [GreaterThanOrEqual(0f)]
    public float WindSpeed { get; set; }

    [GreaterThanOrEqual(0f)]
    public float PrecipitationAmount { get; set; }

    [WeatherCondition(false)]
    public string WeatherCondition { get; set; } = null!;

    [Required]
    public DateTime MeasurementDateTime { get; set; }

    public List<long>? WeatherForecast { get; set; }
}